<admintpl file="header" />
</head>
<body>
	<div class="wrap js-check-wrap">
		<ul class="nav nav-tabs">
			<li class="active"><a href="javascript:;">商品订单管理</a></li>
		</ul>
		<form class="well form-search" method="post" action="{:U('Order/index')}">
			订单类型：
			<select name="order_type" style="width: 160px;">
				<option value='0'>全部</option>
				<option value='1' <if condition="$order_type eq 1"> selected </if>>代付款</option>
				<option value='2' <if condition="$order_type eq 2"> selected </if>>待发货</option>
				<option value='3' <if condition="$order_type eq 3"> selected </if>>待收货</option>
				<option value='4' <if condition="$order_type eq 4"> selected </if>>完成</option>
			</select> &nbsp;&nbsp;
			时间：
			<input type="text" name="start_time" class="js-datetime" value="{$formget.start_time|default=''}" style="width: 120px;" autocomplete="off">-
			<input type="text" class="js-datetime" name="end_time" value="{$formget.end_time|default=''}" style="width: 120px;" autocomplete="off"> &nbsp; &nbsp;
			订单号：
			<input type="text" name="order" style="width: 200px;" value="{$formget.order|default=''}" placeholder="请输入商品名称...">
			<input type="submit" class="btn btn-primary" value="搜索" />
			<a class="btn btn-danger" href="{:U('Order/index')}">清空</a>
		</form>
		<form class="js-ajax-form" action="" method="post">
			<!--<div class="table-actions">-->
				<!--<button class="btn btn-danger btn-small js-ajax-submit" type="submit" data-action="{:U('Order/delete')}" data-subcheck="true" data-msg="您确定删除吗？">删除</button>-->
			<!--</div>-->
			<table class="table table-hover table-bordered table-list">
				<thead>
					<tr>
						<th width="15"><label><input type="checkbox" class="js-check-all" data-direction="x" data-checklist="js-check-x"></label></th>
						<th width="50">订单号</th>
						<th>商品名称</th>
						<th width="160">图片</th>
						<th width="120">会员昵称</th>
						<th>原价</th>
						<th>现价</th>
						<th width="50">数量</th>
						<th width="120">购买时间</th>
						<th width="50">状态</th>
						<!--<th width="120">操作</th>-->
					</tr>
				</thead>
				<foreach name="orders" item="vo">
				<tr>
					<td>
						<input type="checkbox" class="js-check" data-yid="js-check-y" data-xid="js-check-x" name="ids[]" value="{$vo.id}">
					</td>
                    <td><b>{$vo.order}</b></td>
					<td>{$vo.shop_title}</td>
					<td>
						<php>$smeta=json_decode($vo['smeta'],true);</php>
						<if condition="empty($smeta['thumb'])">
							<img src="__TMPL__Public/assets/images/default-thumbnail.png" width="135" style="cursor: hand"/>
							<else />
							<img src="{:sp_get_image_preview_url($smeta['thumb'])}" width="135" style="cursor: hand; height: 113px;"/>
						</if>
					</td>
					<td>{$vo.user_nicename|default=$vo.user_login}</td>
					<td>{$vo.shop_yprice}</td>
					<td>{$vo.shop_price}</td>
					<td>{$vo.num}</td>
					<td>{:date('Y-m-d H:i',strtotime($vo['time']))}</td>
					<td>
							<if condition="$vo.order_type eq 1">
								代付款
							<elseif condition="$vo.order_type eq 2"/>
								待发货
							<elseif condition="$vo.order_type eq 3"/>
								已发货
							<elseif condition="$vo.order_type eq 4"/>
								完成
							</if>
					</td>
					<!--<td>
						<a href="{:U('Order/edit',array('id'=>$vo['id'],'p'=>$p))}">编辑</a> |
						<a href="{:U('Order/delete',array('id'=>$vo['id']))}" class="js-ajax-delete">删除</a>
					</td>-->
				</tr>
				</foreach>
				<tfoot>
					<tr>
						<th width="15"><label><input type="checkbox" class="js-check-all" data-direction="x" data-checklist="js-check-x"></label></th>
						<th width="50">订单号</th>
						<th>商品名称</th>
						<th width="160">图片</th>
						<th width="120">会员</th>
						<th>原价</th>
						<th>现价</th>
						<th width="50">数量</th>
						<th width="120">购买时间</th>
						<th width="50">状态</th>
						<!--<th width="120">操作</th>-->
					</tr>
				</tfoot>
			</table>
			<!--<div class="table-actions">-->
				<!--<button class="btn btn-primary btn-small js-ajax-submit" type="submit" data-action="{:U('Shop/listorders')}">排序</button>-->
				<!--<button class="btn btn-danger btn-small js-ajax-submit" type="submit" data-action="{:U('Shop/delete')}" data-subcheck="true" data-msg="你确定删除吗？">删除</button>-->
			<!--</div>-->
			<div class="pagination">{$page}</div>
		</form>
	</div>
	<script src="__PUBLIC__/js/common.js"></script>
	<link rel="stylesheet" href="__PUBLIC__/js/dist/css/bootstrap-select.css">
	<script src="__PUBLIC__/js/dist/js/bootstrap-select.min.js"></script>
</body>
</html>